package com.example.springmvc.demos.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * url参数类型  ?后面
 */
@RestController
@RequestMapping("/url2")
public class UrlParamController2 {

    @RequestMapping("/test1")
    public String test1(@RequestParam(name="name") String name,@RequestParam(name = "id") int id){
        return name+"_3"+id;
    }
}
